<template>
  <section style="width:600px;white-space: nowrap;">
    <!-- <div class="paintName_box">
       换成大富豪大家好烦得很撒即可发货的数据库和开发大厦艰苦奋斗红烧鸡块后方可打砂机客服电话手机卡喝咖啡和贷款撒很费劲看得上
    </div> -->
    <div v-if="flog==1" class="paintName_box">
      <span v-for="(it,index) in list" class="tag_patientName" :key="index">
        {{it.sourceCode}} {{it.patientName | changePaintName}}
        <label v-if="index<(it.length-1)">、</label>
      </span>
    </div>
  </section>
</template>
<script>
export default {
  props: ["list"],
  data() {
    return {
      flog: 0
    };
  },
  filters: {},
  mounted() {
    let th = this;
    let scrollLeft = th.$el.scrollLeft;
    let width = th.$el.clientWidth;
    let t=setInterval(() => {
      if (scrollLeft > width) {
        // th.flog == 1;
      } else {
        // th.flog == 0;
        th.$el.scrollLeft=200;
      }
      th.$el.scrollLeft++;
    }, 10);
  }
};
</script>
<style lang="scss" scoped>
.paintName_box {
  display: inline-block;
  //   flex-shrink: 0;
  white-space: nowrap;
  // width: 100%;
}
.paint_section {
  width: 600px;
  white-space: nowrap;
}
.tag_patientName {
  display: inline-block;
  font-size: 46px;
  margin-left: 10px;
}
</style>